package com.cyh.ebptasywar.common.config;

import com.cyh.ebptasywar.job.PromptWorkJob;
import org.quartz.JobBuilder;
import org.quartz.JobDetail;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * JobDetail配置类
 * @author theone
 */
@Configuration
public class JobDetailConfig{
    @Bean("PromptWorkJobDetail")
    public JobDetail promptWorkJobDetail(){
        JobDetail jobDetail = JobBuilder.newJob(PromptWorkJob.class).withIdentity("PromtWork","ebptasy")
                .usingJobData("key","value").storeDurably().build();
        return jobDetail;
    }
}
